package com.dushibao.front.goodsclass;

import com.dushibao.entity.GoodsClass;
import com.dushibao.service.GoodsClassService;
import com.dushibao.service.impl.GoodsClassServiceImpl;
import com.dushibao.view.ModelAndView;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/goodsClassSecond")
public class GoodsClassSecondServlet extends HttpServlet {
    GoodsClassService goodsClassService = new GoodsClassServiceImpl();

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        GoodsClass goodsClass = goodsClassService.getByPid(Long.parseLong(req.getParameter("pid")));
        req.setAttribute("goodsClass",goodsClass);

        ModelAndView mv = new ModelAndView("goodsClass/goodsClassSecond");
    }
}
